package routers

import (
	"fabric_helper/bootstrap"
	"github.com/gin-gonic/gin"
	"log"
)

func SetupRouter() *gin.Engine {
	r := gin.Default()
	// 默认路由输出格式
	gin.DebugPrintRouteFunc = func(httpMethod, absolutePath, handlerName string, nuHandlers int) {
		log.Printf("endpoint %v %v %v %v\n", httpMethod, absolutePath, handlerName, nuHandlers)
	}
	r.GET("bootstrap", bootstrap.Gen) //

	return r
}
